home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Camelot / Camelot 043 (1989-06)(Swedish User Group of Amiga)(SE)(PD)[WB].zip / Camelot 043 (1989-06)(Swedish User Group of Amiga)(SE)(PD)[WB].adf / zc / gen.h < prev    next >
C/C++ Source or Header  |  1989-03-08  |  1KB  |  59 lines

  1. /* Copyright (c) 1988 by Sozobon, Limited.  Author: Johann Ruegg
  2.  *
  3.  * Permission is granted to anyone to use this software for any purpose
  4.  * on any computer system, and to redistribute it freely, with the
  5.  * following restrictions:
  6.  * 1) No charge may be made other than reasonable charges for reproduction.
  7.  * 2) Modified versions must be clearly marked as such.
  8.  * 3) The authors are not responsible for any harmful consequences
  9.  *    of using this software, even if they result from defects in it.
  10.  *
  11.  *    gen.h
  12.  */
  13.  
  14. #include "cookie.h"
  15.  
  16. /* parameters for case */
  17. #define C_SIMPLE    8    /* use simple if n <= this */
  18. #define C_RATIO        3    /* use table if max-min/n <= this */
  19.  
  20. /* branch types */
  21. /* designed so that pairs (i,i+1) with odd i represent opposites */
  22. #define B_EQ    1
  23. #define B_NE    2
  24. #define B_LT    3
  25. #define B_GE    4
  26. #define B_LE    5
  27. #define B_GT    6
  28. #define B_YES    7
  29. #define B_NO    8
  30. #define B_ULT    9
  31. #define B_UGE    10
  32. #define B_ULE    11
  33. #define B_UGT    12
  34.  
  35. /* derived nodes */
  36. /* re-use stmt keywords for now */
  37. #ifndef ENUMS
  38. #define ONAME    'a'
  39. #define OREG    'b'
  40. #define REGVAR    'c'
  41. #define PUSHER    'd'
  42. #define CMPBR    'e'
  43. #define FIELDAS    'f'
  44. #else
  45. enum {
  46.     ONAME = 'a', OREG, REGVAR, PUSHER, CMPBR, FIELDAS
  47. };
  48. #endif
  49.  
  50. #define BR_TOK    'i'
  51.  
  52. /* evaluation order values */
  53. #define EV_NONE        0
  54. #define EV_LEFT        1
  55. #define EV_RIGHT    2
  56. #define EV_LR        3
  57. #define EV_RL        4
  58. #define EV_LRSEP    5    /* left then right, but seperate */
  59.